﻿using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;

namespace AmazeUI.Imodel
{
    public class SqlClass
    {
        /// <summary>
        /// 生成链接字符串
        /// </summary>
        /// <returns></returns>
        public static SqlConnection GetConnection()
        {
            var ssb = new SqlConnectionStringBuilder();
            ssb.DataSource = "127.0.0.1";
            ssb.UserID = "sa";
            ssb.Password = "sa";
            ssb.InitialCatalog = "OnDb";
            ssb.PersistSecurityInfo = true;
            return new SqlConnection(ssb.ToString());
        }
    }
}
